<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/3/26
 * Time: 16:16
 */

namespace app\supplier\controller;


use app\service\base\Controller;
use app\supplier\model\SupplierUser;



class Base extends Controller
{

    public function initialize()
    {
        parent::initialize();
        $user_id = request()->user_id;
        if ($user_id) {
            $this->user_id    = $user_id;
            $this->userInfo   = SupplierUser::where('id', $user_id)->find();
            $this->company_id = $this->userInfo->company_id;
            $this->supplier_id = $this->userInfo->supplier_id;
        }
    }
}